﻿<navigation:Page
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 mc:Ignorable="d"
                 xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
                 xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" x:Class="TheOliver.DigitalSignage.Admin.Views.AllEvents"
                 d:DesignWidth="640"
                 d:DesignHeight="480"
                 Title="AllEvents Page"
    xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Ria"
    xmlns:my="clr-namespace:Web.Services"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data">
  <Grid x:Name="LayoutRoot">
  	<Grid.ColumnDefinitions>
  		<ColumnDefinition Width="0.47*"/>
  		<ColumnDefinition Width="0.53*"/>
  	</Grid.ColumnDefinitions>

  	<controls:TreeView x:Name="_tree" Margin="8"
             />
        <riaControls:DomainDataSource
            AutoLoad="True"
            Height="0"
            LoadedData="allSlotsDomainDataSource_LoadedData"
            Name="allSlotsDomainDataSource"
            QueryName="GetAllSlotsQuery"
            Width="0">
            <riaControls:DomainDataSource.DomainContext>
                <my:DigitalSignageDomainContext />
            </riaControls:DomainDataSource.DomainContext>
        </riaControls:DomainDataSource>
        <data:DataGrid
            AutoGenerateColumns="False"
            Grid.Column="1"
            ItemsSource="{Binding ElementName=allSlotsDomainDataSource, Path=Data}"
            Name="allSlotsDataGrid"
            RowDetailsVisibilityMode="VisibleWhenSelected" Margin="8">
            <data:DataGrid.Columns>
                <data:DataGridTextColumn
                    x:Name="eventDescriptionColumn"
                    Binding="{Binding Path=EventDescription}"
                    Header="Event Description"
                    Width="SizeToHeader" />
                <data:DataGridTemplateColumn
                    x:Name="eventEndDateColumn"
                    Header="Event End Date"
                    Width="SizeToHeader">
                    <data:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <controls:DatePicker
                                SelectedDate="{Binding Path=EventEndDate, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" />
                        </DataTemplate>
                    </data:DataGridTemplateColumn.CellTemplate>
                </data:DataGridTemplateColumn>
                <data:DataGridTextColumn
                    x:Name="eventIdColumn"
                    Binding="{Binding Path=EventId}"
                    Header="Event Id"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="eventNameColumn"
                    Binding="{Binding Path=EventName}"
                    Header="Event Name"
                    Width="SizeToHeader" />
                <data:DataGridTemplateColumn
                    x:Name="eventStartDateColumn"
                    Header="Event Start Date"
                    Width="SizeToHeader">
                    <data:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <controls:DatePicker
                                SelectedDate="{Binding Path=EventStartDate, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" />
                        </DataTemplate>
                    </data:DataGridTemplateColumn.CellTemplate>
                </data:DataGridTemplateColumn>
                <data:DataGridTextColumn
                    x:Name="roomDescriptionColumn"
                    Binding="{Binding Path=RoomDescription}"
                    Header="Room Description"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="roomNameColumn"
                    Binding="{Binding Path=RoomName}"
                    Header="Room Name"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="sessionAbstractColumn"
                    Binding="{Binding Path=SessionAbstract}"
                    Header="Session Abstract"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="sessionTitleColumn"
                    Binding="{Binding Path=SessionTitle}"
                    Header="Session Title"
                    Width="SizeToHeader" />
                <data:DataGridTemplateColumn
                    x:Name="slotDateColumn"
                    Header="Slot Date"
                    Width="SizeToHeader">
                    <data:DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <controls:DatePicker
                                SelectedDate="{Binding Path=SlotDate, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" />
                        </DataTemplate>
                    </data:DataGridTemplateColumn.CellTemplate>
                </data:DataGridTemplateColumn>
                <data:DataGridTextColumn
                    x:Name="slotTimeColumn"
                    Binding="{Binding Path=SlotTime}"
                    Header="Slot Time"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="speakerBiographyColumn"
                    Binding="{Binding Path=SpeakerBiography}"
                    Header="Speaker Biography"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="speakerFirstnameColumn"
                    Binding="{Binding Path=SpeakerFirstname}"
                    Header="Speaker Firstname"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="speakerImageUrlColumn"
                    Binding="{Binding Path=SpeakerImageUrl}"
                    Header="Speaker Image Url"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="speakerLastnameColumn"
                    Binding="{Binding Path=SpeakerLastname}"
                    Header="Speaker Lastname"
                    Width="SizeToHeader" />
                <data:DataGridTextColumn
                    x:Name="speakerTitleColumn"
                    Binding="{Binding Path=SpeakerTitle}"
                    Header="Speaker Title"
                    Width="SizeToHeader" />
            </data:DataGrid.Columns>
        </data:DataGrid>
    </Grid>
</navigation:Page>
